import './assets/tailwind.css'
import 'vue-element-plus-x/styles/prism.min.css'
import "katex/dist/katex.min.css";
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'
import App from './App.vue'
import router from './router'
import ElementPlusX from 'vue-element-plus-x'

// 引入 stagewise 工具栏（仅开发环境）
import { StagewiseToolbar } from '@stagewise/toolbar-vue'

const app = createApp(App)
app.use(ElementPlus)
app.use(Antd)
app.use(createPinia())
app.use(router)
app.use(ElementPlusX)

// 在开发环境下挂载 stagewise 工具栏
if (import.meta.env.DEV) {
  const stagewiseConfig = {
    plugins: []
  }
  app.component('StagewiseToolbar', StagewiseToolbar)
  // 在应用挂载后立即初始化工具栏
  app.provide('stagewiseConfig', stagewiseConfig)
}

app.mount('#app')
